Method and apparatus for calculating an average value of an inaccessible current from an accessible current

ABSTRACT

In a power converter, a circuit determines an average value of an inaccessible current from an average value of an accessible current and a value of the operating duty cycle of the converter. A method of measuring an average value of an inaccessible current from a measured value of a current in a power converter by a duty cycle of a pulse width modulation (PWM) signal representing a duty cycle of the power converter. Coupling a voltage representing the measured value to an input of a low pass filter during a time period (D) and coupling the input of the low pass filter to a reference voltage during a time period (1−D).

CROSS-REFERENCE TO RELATED APPLICATIONS

This patent application is a continuation of U.S. Nonprovisionalapplication Ser. No. 14/455,582, filed Aug. 8, 2014, which claimspriority from U.S. Provisional Application No. 61/919,416, filed on Dec.20, 2013 and from U.S. Provisional Application 61/870,590, filed on Aug.27, 2013, which are incorporated herein by reference in their entiretyfor all purposes. This patent application is related to U.S. applicationSer. No. 14/455,545 filed on even date and U.S. application Ser. No.14/455,607 filed on even date, both of which are incorporated herein byreference in their entirety for all purposes.

FIELD

The invention relates to power converters and more specifically to powerconverters in which it is necessary to measure and/or control theconverter utilizing an inaccessible current.

BACKGROUND

It may be necessary to measure a current within a power converter and/orcontrol a power converter utilizing a measurement of a current which isinaccessible. As used herein, the term “inaccessible” includes, but isnot limited to, a situation in which the power converter cannot access ameasurement of a current within a load, because they are physicallyseparate, for example. The load may not have means for measuring thedesired current and it may not be possible to add such means or provideaccess to such measurement for a physically separate power converter.The term “inaccessible” is also intended to mean the situation in whichthe measurement of the current may be accessible, but the measurementmay be difficult and/or expensive to make. For example, the result ofthe measurement, which may be a voltage, may be referred to a differentground or to a higher voltage, thus making a measuring or controlcircuit both difficult and/or expensive to make, in addition to beingcomplex. Another possibility is that the current to be measured may beon the wrong side of the isolation barrier where it is undesirable topenetrate the barrier. Furthermore, the term “inaccessible” is intendedto cover the situation in which the measurement of the current may beaccessible and the cost and/or complexity of the circuit needed to makethe measurement may be reasonable, but the measurement requires a highpower dissipation. This can occur, for example, if a resistive shunt isused to measure the current in a high current power converter whereproducing a usable voltage across the shunt (e.g. 100 mV) may result inhigh power dissipation due to the high current passing through theshunt. Those skilled in the art will recognize that there are othersituations in which the current desired to be measured and/or used tocontrol a power converter may be “inaccessible”.

It should be noted that although power converter circuits are sometimescalled “regulators,” the term “power converters” or “converters” as usedherein should be considered as referring to a buck circuit, a boostcircuit, or a buck-boost (flyback) circuit.

Thanks to the work of Vorperian and others who proposed a pulse widthmodulation (PWM) switch concept, there are known relationships betweendifferent average currents in the three types of converters, if theconverter is operating in transition mode (TM) or continuous currentmode (CCM). These relationships are:Buck: I _(sw) =I _(in) =I _(out) *D=I _(Diode) *D/(1−D)  equation (1)Boost: I _(sw) =I _(in) *D=I _(out)*(1−D)/D=I _(Diode)*(1−D)/D  equation(2)Buck-Boost: I _(sw) =I _(in) =I _(out)*(1−D)/D=I _(Diode)*D/(1−D)  equation (3)

where I_(SW) is the current in the switch;

-   -   I_(IN) is the input current to the converter;    -   I_(OUT) is the output current from the converter;    -   I_(Diode) is the current in the rectifier diode or synchronous        switch;    -   D is the duty cycle of the PWM switch; and    -   (1−D) is the duty cycle of the rectifier.

As can readily be seen by analysis of the equations, if the desiredcurrent to be measured or controlled is “inaccessible” (as definedherein), we can sense a more convenient current and then solve theappropriate equation from equations 1-3 to obtain a replica of thedesired current which can then be used to provide the measurement and/orcan be used as the control variable.

A problem with solving one of these equations is that it requiresmultiplication and/or division. As is well known to those skilled in theart, analog multiplication and division circuits are inaccurate,expensive, take up a lot of room on an integrated circuit and consumeconsiderable power. On the other hand, utilizing digital circuits forthis purpose requires an ADC circuit at the input and a DAC circuit atthe output, if analog control is to be implemented. Thus, digitalmultiplication or division does not provide the desired solution,either.

Thus, there is a need for a simple, inexpensive, high-performance andreliable circuit to permit analog multiplication or division within apower converter to enable the use of inaccessible current measurement toprovide a desired current for measurement and/or control in the powerconverter.

SUMMARY

It is a general object to provide analog multiplication or divisionwithin a power converter to enable the use of inaccessible currentmeasurement to provide a desired current for measurement and/or controlin the power converter.

In an aspect, a buck converter having a regulated output currentcomprises a current measuring device measuring an input current to theconverter. A switch is coupled to the current measuring device. A pulsewidth modulation (PWM) circuit is coupled to receive an output voltagefrom the measuring device. An analog multiplier is coupled to an outputof the pulse width modulation (PWM) circuit to receive a signal (D)related to the duty cycle of the regulator and to a voltagerepresentative of a predetermined value of output current from theconverter.

In an aspect, a boost converter having a regulated average outputcurrent comprises a switch coupled to receive input current from theconverter. A current measuring device measures the input current to theconverter and generates a voltage representative thereof a voltagerepresents a constant related to a value at which the output current isregulated to. A first analog multiplier is coupled to the voltagerepresenting the constant multiplying the constant K by a signalrepresentative of one minus the duty cycle of the converter (1−D) togenerate a signal K*(1−D). A second analog multiplier is coupled betweenthe voltage representative of the input current and a first input to apulse width modulation (PWM) circuit. A second input to the pulse widthmodulation (PWM) circuit being coupled to receive the signal K*(1−D).

In an aspect, a buck voltage to current converter comprises a source ofAC input voltage. A switch is coupled to a load through an inductor. Acurrent measuring device measures current through the switch. A currentsource is coupled to an analog multiplier for multiplying a currentvalue by a duty cycle of the converter. A pulse width modulation (PWM)circuit receives a voltage output from the multiplier at one terminalthereof and receives a voltage related to the current measured by thecurrent measuring device, the pulse width modulation (PWM) circuitgenerating a signal related to a duty cycle of the converter (D),wherein the switch is operated by the signal to generate a currentthrough the load related to a constant times the input voltage.

In an aspect, a method for operating a dimmable LED comprises couplingan LED driver circuit to a rectified output of an AC dimmer. Providing acurrent related to an input voltage of the LED driver circuit.Multiplying the value of the current by the input voltage, and a dutycycle of the LED driver to generate a first voltage. Comparing the firstvoltage with a voltage representative of current through a switch in theLED driver circuit to generate a comparison signal. Utilizing thecomparison signal to generate a pulse width modulation (PWM) signalutilized to control the switch and the multiplication to drive the LED.

BRIEF DESCRIPTION OF THE DRAWINGS

Further aspects of the invention will appear from the appending claimsand from the following detailed description given with reference to theappending drawings.

FIG. 1 is a schematic of an analog multiplier in accordance with anembodiment;

FIG. 2 is a schematic of an analog divider in accordance with anembodiment;

FIG. 3 is a schematic to calculate I_(out);

FIG. 4 illustrates the waveforms of the circuit of FIG. 3;

FIG. 5 shows the regulation of average output current;

FIG. 6 shows a simplification of the circuit of FIG. 5;

FIG. 7 shows the line regulation of the circuit of FIG. 6;

FIG. 8 shows the load regulation of the circuit of FIG. 6;

FIG. 9 shows regulating the average output current of a boost converter;

FIG. 10 shows the circuit of FIG. 9 with the divider circuit eliminated;

FIG. 11 shows a schematic of a voltage-to-current converter;

FIG. 12 shows the waveforms of the circuit of FIG. 11; and

FIG. 13 shows a buck-boost (flyback) converter.

DETAILED DESCRIPTION OF EXAMPLE EMBODIMENTS

Those skilled in the art will recognize that, normally when a current ismeasured, a voltage analog of current is generated where the amplitudeof the voltage is related to the amplitude of the current. Commonmethods of measuring current are to use a resistive shunt, a currenttransformer or a Hall effect device. The voltage generated by one ofthese devices can be used within the converter, in conjunction with oneof the equations 1-3, to control the operation of the converter and/orprovide the desired measurement.

FIG. 1 shows an analog multiplication circuit in accordance with anembodiment, generally as 100. A voltage (A) represents the voltagegenerated across one of the current measuring devices and is showngenerated by voltage source 102. The negative terminal of the voltagesource is coupled to ground, the positive terminal is coupled to aswitch 104, the other side of which is connected to a node 112. A secondswitch 106 is connected between the node 112 and ground. A resistor R114 is coupled between the node 112 and output terminal 118. A capacitor116 is coupled between the output terminal 118 and ground.

The multiplier 100 takes advantage of the pulse width modulation (PWM)signal 108 which is already generated within the converter for theoperation of the converter. The signal (D) represents the duty cycle ofthe main switch of the converter and the signal (1−D), which isgenerated by inverting the signal (D) via inverter 110, represents theduty cycle of a rectifier or synchronous switch of the converter. Theswitch 104 is closed when the signal (D) is in a first logic state andthe switch 106 is open when the signal (1−D) is in a second logic state.The switch 104 is open when the signal (D) is in the second logic stateand the switch 106 is closed when the signal (1−D) is in the first logicstate. The first logic state may represent a digital “1” and the secondlogic state may represent a digital “0”, for example. The voltage onnode 112 is low pass filtered by the RC filter 114, 116 to generate asignal D*A at the output terminal 118. Thus, circuit 100 requires onlytwo additional switches 104, 106, a resistor 114 and capacitor 116 toproduce a simple multiplication circuit.

FIG. 2 shows a division circuit in an embodiment, generally as 200. Avoltage (A) represents the voltage generated by one of the currentsensing devices and is shown generated by a voltage source 202, whichhas a negative terminal coupled to ground. The positive terminal ofvoltage generating circuit 202 is coupled to the non-inverting input ofoperational amplifier 204. The output of operational amplifier 204 atterminal 206 is the output V_(out) of the circuit. A capacitor C 210 iscoupled between the output of the operational amplifier and theinverting input thereof. The voltage at the output terminal is alsocoupled to one side of a switch 212, the other side of which is coupledto a node 220. A second switch 216 has one end coupled to the node 220and the other end coupled to ground. A resistor R 208 is coupled betweenthe node 220 and the inverting terminal of the operational amplifier204.

The divider 200 takes advantage of the pulse width modulation (PWM)signals 208 which are already generated within the converter for theoperation of the converter. The signal (D) represents the duty cycle ofthe main switch of the converter and the signal (1−D), which isgenerated by inverting the signal (D) via inverter 218, represents theduty cycle of a rectifier or synchronous switch of the converter. Theswitch 212 is closed when the signal (D) is in a first logic state andthe switch 216 is open when the signal (1−D) is in a second logic state.The switch 212 is open when the signal (D) is in the second logic stateand the switch 216 is closed when the signal (1−D) is in the first logicstate. The first logic state may represent a digital “1” and the secondlogic state may represent a digital “0”, for example. In steady-stateoperation, the average voltages at the inverting and non-invertinginputs to the operational amplifier 204 must be equal. Therefore,A=V_(out)*D. Consequently, V_(out)=A/D. Thus circuit 200 requires theaddition of only two switches 212, 216 a resistor R 208, a capacitor C210 and operational amplifier 204, to produce a simple division circuit.Normally, division circuits are far more complex than multiplicationcircuits. Here, however, the only difference is the addition of theoperational amplifier 204. It should be noted that if the voltage (A) isa DC voltage, the value of RC should be much much greater than theperiod of the switching signal used to generate the pulse widthmodulation (PWM) signal.

FIG. 3 illustrates the use of the analog divider circuit to calculatethe average output current I_(out) from the input current I_(in),generally as 300. The circuit has a current transformer 301 whichreceives the input current I_(in) from the switch (not shown) at 302,which passes through winding 304. This circuit illustrates the problemdescribed in the background portion of the present application in whichthe input current is a high-value current and where the use of aresistive shunt to measure the current would cause excessive losses. Thecurrent transformer 301 has a ratio of 1:K1 so the measured inputcurrent is K1 times more than the output current. The currenttransformer 301 has a secondary winding 306, having one end thereofcoupled to ground, the other end coupled to the anode of a diode 308.The cathode of diode 308 is coupled to a node having a resistor R11 312coupled to ground, which generates a voltage proportional to the inputcurrent applied to the primary winding 304. A low pass filter comprisingresistor R1 310 and capacitor C1 314 is connected across the resistorR11 312. The low pass filter 310, 314 generates a signal related to theaverage current through the primary winding 304 of current transformer301. The voltage at the node between resistor 310 and capacitor 314 isapplied to the non-inverting terminal of operational amplifier 316. Theoutput V1 of the operational amplifier 316 is connected to one terminalof a switch S1 320, the other terminal of which is connected to a node326. The node 326 is connected to one terminal of a resistor R2 322, theother terminal of which is connected to the inverting input ofoperational amplifier 316. A capacitor C2 318 is connected between theoutput V1 of the operational amplifier and inverting input thereof. Thenode 326 is coupled to one side of switch S2 324, the other side ofwhich is coupled to ground.

The divider 300 takes advantage of the pulse width modulation (PWM)signals which are already generated within the converter for theoperation of the converter. The signal (D) represents the duty cycle ofthe main switch of the converter (not shown) and the signal (1−D), whichmay be generated by inverting the signal (D) represents the duty cycleof a rectifier or synchronous switch of the converter (not shown). Theswitch 320 is closed when the signal (D) is in a first logic state andthe switch 324 is open when the signal (1−D) is in a second logic state.The switch 320 is open when the signal (D) is in the second logic stateand the switch 324 is closed when the signal (1−D) is in the first logicstate. The first logic state may represent a digital “1” and the secondlogic state may represent a digital “0”, for example.

A pulsed input signal is generated by the switch (not shown) at 302which passes through the primary winding 304 of current transformer 301.This generates a current through the secondary winding 306 equal toI_(in)*K1. That current flows through diode 308 and resistor R11 312 toground. The voltage generated across resistor R11 312 is representativeof the current I_(in) multiplied by the ratio K1. This voltage isaveraged by the low pass filter comprising resistor R1 310 and capacitorC1 314 to generate a voltage representative of the average value of theinput current I_(in)*K1.

The signal I_(in)*K1 is applied to the non-inverting input ofoperational amplifier 316. Thus, the output voltage of the operationalamplifier V1*D is equal to I_(in)*K1. Solving the equation for V1:V ₁ =I _(in) *K1/DRecalling equation 1, for a buck circuit:I _(in) =I _(out) *Dso thatI _(out) =I _(in) /DTherefore:V1=I _(out) *K1We now have I_(out)*K1 which is related to the diode I_(in) by the turnsratio (constant) K1. If the turns ratio is in unity, for example, thenV1 equals I_(out). Thus, through the use of the equations and an averagevalue of an accessible current, we can obtain the value of aninaccessible current. This value can also be used as the variable forcontrol of the power converter. In this particular case, the ripple inthe filter 310, 314 is in phase with the ripple in filter 318, 322 whichallows very low values of the resistors and capacitors to be used in thefilters (less than the period of the switching frequency); therefore,response time is excellent.

FIG. 4 shows a simulation of the circuit shown in FIG. 3, generally as400. In this simulation, the time constant R 1310, C1 314 equals thetime constant R2 322, C2 318 which equals the period of the switchingfrequency. The signal 404 represents the current in the inductor and thewaveform 402 represents the output of the circuit shown in FIG. 3, thatis at V1. As can be seen, the waveform 402 is a substantially DCwaveform which follows the actual waveform of the inductor current verywell, even during the transitions. Thus, the circuit shown in FIG. 3yields a very accurate depiction of the output current, even though onlythe input current can be measured.

FIG. 5 shows a circuit for controlling a buck regulator, generally as500. In this circuit, it is desired to control the output current of thebuck regulator which flows through LED 506. However, only the inputcurrent is accessible. This could be because the LEDs are physicallyseparate from the regulator, for example. The buck regulator comprises aswitch 510 coupled to the anode of the diode 504, the cathode of whichis coupled to the positive terminal of the input voltage 502. Thenegative terminal of input voltage source 502 is coupled to ground.Inductor 508 is coupled to the switch 510 and the LED(s) 506 which arein series with the inductor and coupled between the input voltage andthe switch 510. A shunt 514 is coupled between the switch 510 andground. The shunt provides a voltage which is representative of thecurrent flowing through the switch. Voltage across the shunt is coupledto a RC low pass filter comprising resistor 512 and capacitor 516. Thisproduces a voltage related to the average current through the shunt.This voltage is fed into divider circuit 518, such as the dividercircuit shown in FIG. 3. The divider is operated by the signal (D) whichis output from the pulse width modulation (PWM) circuit 532 and coupledthrough the averaging circuit comprising resistor R1 522 and capacitorC1 520 to operate the divider circuit 518, as discussed above inconnection with FIG. 3. The output of the divider is coupled viaresistor 524 to the inverting input of a current amplifier 528. Acapacitor 526 is coupled between the output of current amplifier 528 andthe inverting input thereof. A current reference 530 having a value K2has a positive terminal connected to the non-inverting input ofamplifier 528 and negative terminal coupled to ground. The output of thecurrent amplifier 528 is coupled as an input to the pulse widthmodulation (PWM) circuit 532. The pulse width modulation (PWM) circuit532 generates the signal (D).

The power converter 500 works by regulating the current utilizing theequation 1:I _(out) *D=I _(in)

-   -   solving for I_(out)        I _(out) =I _(in) /D        The loop regulates the output current by forcing it to K2, the        value of the current reference 530. Thus, the current through        the LED(s) can be maintained constant, as is preferable for        operating LED(s), without actually measuring the current        therethrough.

FIG. 6 shows a circuit for implementing the concepts shown in FIG. 5.However, the circuit shown in FIG. 6 has been simplified by regulatingthe loop to I_(in) equals K3*D instead of regulating the loop so thatI_(in)/D equals K2. In FIG. 6, the buck regulator comprises a switch 610coupled to the anode of the diode 604, and the cathode which is coupledto the positive terminal of the input voltage 602. Inductor 608 iscoupled to the switch 610 and the LED(s) 606 which are in series withthe inductor 608 and coupled between the input voltage and the switch610. A shunt 614 is coupled between the switch 610 and ground. The shuntprovides a voltage which is representative of the current flowingthrough the switch. The voltage across the shunt 614 is coupled viaresistor 612 to the inverting input of the current amplifier 618. Theoutput of the current amplifier 618 is coupled via capacitor 616 back tothe inverting input thereof. The output of the current amplifier 618 isalso coupled as an input to the pulse width modulation (PWM) circuit620. The output of the pulse width modulation (PWM) circuit (D) iscoupled to a node 622 which is also coupled to the gate of switch 610. Acurrent reference K3 632 has its negative terminal coupled to ground andits positive terminal coupled to one side of switch 628. The other sideof switch 628 is coupled to node 634. The switch 628 is operated by thesignal (D) at node 622. The signal (D) is inverted by inverter 630 andapplied to a switch 632 which is coupled from the node 634 to ground.The node 634 is coupled via resistor 626 to one side of capacitor 624,the other side of which is coupled to ground. The voltage acrosscapacitor 624 is coupled to the non-inverting input of current amplifier618.

In FIG. 6, the circuit comprising switches 628 and 632 and resistor 626and capacitor 624 are combined to produce a multiplier circuit, asdiscussed above in the present application. Therefore, the voltageacross capacitor 624 becomes K3*D where (D) is the duty cycle signalnode 622. Thus, the loop regulates the input current to K3*D instead ofregulating I_(in)/D to equal K3. By making K3 a constant, the currentthrough the LED(s) 606 remains constant. The disadvantage of thiscircuit is that there is no available measurement of the current that isbeing regulated. However, if that is not needed, as in many cases wherethe object is to maintain a current constant, the circuit becomesincredibly simple.

The simplicity of the circuit shown in FIG. 6, does not detract from itsperformance, as shown in FIGS. 7 and 8. FIG. 7 shows line regulation,generally at 700. The X axis shows the change in input voltage as apercentage and the y-axis shows the percent of variation of Iload. Ascan be seen, the voltage change of the input voltage of 60% only createsa 3% variation in the load current. FIG. 8 shows the load regulation,generally as 800. This shows the percent change in Iload (y-axis) withrespect to percent change in Vload (x-axis). As can be seen from FIG. 8,causing a 60% change in Vload only results in a 1.6% change in Iload.Thus, although the circuit in FIG. 6 is incredibly simple, it alsoyields excellent results.

FIG. 9 shows a control circuit that uses the current in the power switchof a boost converter to indirectly regulate the average output currentof the converter. A voltage source 902 has a negative terminal connectedto ground and its positive terminal connected to one side of inductor904, the other side of which is connected to a node. The node has atransistor switch 906 coupled thereto, one terminal of the conductionchannel being coupled through resistor Rshunt 914 to ground. Alsoconnected to the node is the anode of a diode 908, the cathode of whichis connected to the anode of LED(s) 910, which is the load for the boostconverter, the cathode of which is connected to ground. A capacitor 912is coupled across the load 910. The transistor switch 906 is controlledby a pulse width modulation (PWM) circuit 916 which is driven by theoutput of error amplifier 926. The inverting input of the erroramplifier is connected through resistor R4 920 to the junction of theswitch 906 and the shunt 914. A capacitor C4-1 924 is coupled across theinverting input to the output of the current error amplifier 926. Avoltage source 928 generates a voltage K4 representative of the desiredcurrent output from the converter. The negative terminal of the voltagesource 928 is connected to ground and the positive terminal thereof isconnected to one side of a switch S1 930. The other side of switch S1930 is connected to node 934 which is also connected to one side ofswitch S2 936. The other side of switch S2 936 is connected to ground.The node 934 is coupled via resistor R1 932 to the node V1 from which acapacitor C1 938 is coupled to ground. The voltage V1 is connected tothe non-inverting input of amplifier 940. The output of amplifier 940Vamp1 is connected to one terminal of switch S3 946, which is coupled toa node V2. The node V2 is connected via resistor R2 944 to the invertinginput of amplifier 940. A capacitor C2 942 is connected between theoutput amplifier 940 and the inverting input thereof. The voltage V2 iscoupled to one terminal of switch S4 948, the other terminal of which isconnected to ground. The voltage Vamp1 is coupled to the non-invertinginput of amplifier 926.

In operation, the voltage K4 is chosen to select the desired outputcurrent from the converter. In the converter illustrated in FIG. 9 theload is an LED or a string of LEDs, which, as is well known to thoseskilled in the art, is preferably operated with a constant currentrather than a constant voltage in order to control the brightness of theLED(s). The switch S1 930 is operated by the signal (D) which is theduty cycle signal generated by the pulse width modulation (PWM) circuit916 and utilized to operate the converter, and the switch S2 936 isoperated by the signal (1−D) which can be the inverted signal (D) (notshown). The signal generated at node 934 is averaged by low pass filterR1 932 and capacitor C1 938 to generate a voltage at the node V1 equalto K4*D. The signal on the output of amplifier 940 Vamp1 is divided byswitch S3 946, operated by the signal (1−D) and the switch and S4 948operated by the signal (D). Therefore, the signal at the node V2 will beequal to Vamp1*(1−D). In a properly operating circuit, in steady-state,the voltage input to the amplifier 940 must be equal.Therefore: V1=V2Thus: Vamp1=K4*D/(1−D).

Assuming amplifier to 926 is properly operating and in steady-state, thevoltage at both inputs must be equal. Therefore, utilizing equation 2,we know that:I _(sw) =Vamp1, which =K4*D/(1−D).We also know that:I _(sw) =I _(out)*(1−D)/D.Solving the equation for I_(out):I _(out) =I _(sw)*(1−D)/D.Therefore:I _(out) =K4*D/(1−D)*(1−D)/D, which =K4.

Therefore, the current has been regulated to a value represented by thevoltage K4.

As with the embodiments shown in FIGS. 5 and 6, if the desire is toregulate the current but do not require a measure of that current, thecircuit can be simplified. Thus, in the circuit shown in FIG. 5, thecurrent may be measured, whereas in the circuit shown in FIG. 6, thecurrent measurement was not available but the circuit was much simpler.FIG. 10 is a simpler circuit than FIG. 9, which eliminates the dividercircuit shown in FIG. 9.

In FIG. 10, a voltage source 1002 has a negative terminal connected toground and its positive terminal connected to one terminal of inductor1004, which has the other terminal connected to a node 1007. Oneterminal of the conduction channel of a switch transistor 1006 isconnected to the node 1007, the other terminal of the conduction channelis connected to ground through Rshunt 1014. The node is also connectedto the anode of a diode 1008, the cathode of which is connected to theanode of an LED or string of LEDs 1012, which is the load for thisconverter, a cathode of which is connected to ground. A capacitor 1010is connected across the load 1012. A voltage K5 is generated by voltagesource 1042 which has its negative terminal connected to ground and itspositive terminal connected to one end of switch S1 1036. The otherterminal of switch 1036 is connected to node 1038. The node 1038 is alsoconnected to one terminal of switch S2 1040, the other terminal which isconnected to ground. The voltage K5 is related to the desired currentthrough the load 1012. The node 1038 is connected through resistor R11034 to one terminal of capacitor C1 1032, the other terminal of whichis connected to ground. A voltage V1 is developed at the junction 1033between the resistor and the capacitor. This voltage V1 is coupled tothe non-inverting input of current error amplifier 1030. The invertinginput of current error amplifier 1030 is connected via resistor R4 1026to a node 1022. The node 1022 is connected to ground via a switch 1024,operated by the signal (D) and connected to a node 1021 via a switch1020, operated by the signal (1−D). The node 1021 is connected to thejuncture of the shunt 1014 and the switching transistor 1006 viaresistor R2 1018. The node 1021 is also connected to capacitor C2 1023,the other terminal of which is connected to ground. A capacitor C4-11028 is connected between the inverting input of current error amplifier1030 and its output. The output of amplifier 1030 is connected to aninput of pulse width modulation (PWM) circuit 1016, which outputs thesignal (D) that operates switches S1-S4 and the switching transistor1006.

In operation, the signal (D) is used to operate the switches S1 1036 andS3 1024. The inverse of the signal (D), (1−D), is used to operate theswitches S2 1040 and S4 1020. The voltage K5 is related to the currentwhich is desired to be regulated through the load, herein, LED(s). Theresistor R1 1034 and capacitor C1 1032 form a low pass filter for thesignal at node 1038. Therefore, the voltage V1 at node 1033 will beequal to K5*(1−D). The filter circuit formed by resistor R2 1018 and C21023 averages the voltage across Rshunt 1014. This average voltage isapplied to the multiplier comprising switches S3 1024 and S4 1020 whichmultiplies the value I_(sw) by (1−D) to generate a signal I_(sw)*(1−D)which is applied to the inverting input of current error amplifier 1030.If the circuit is operating properly and in steady-state, the voltage atboth the inverting and non-inverting inputs of the current amplifier1030 must be equal; Therefore:V1=V2If V1 equals V2, then:I _(sw)*(1−D)=K5*DSolving for I_(sw).I _(sw) =K5*D/(1−D)We know from equation 2 that:I _(out) =I _(SW)*(1−D)/D

Substituting, the result is that I_(out) is equal to K5. The result isthat the output current is equal to a chosen voltage representative ofthe desired output current and is the same for the circuit shown inFIGS. 9 and 10, except that the circuit shown in FIG. 10 is far simpler.In many cases, it is not necessary to know the value of the current thatis being regulated, and in this situation, the circuit shown in FIG. 10is superior because it is less-complex.

FIG. 11 shows the versatility of the present invention. The circuitshown in FIG. 11 illustrates the utilization of a phase-cut dimmer todim an LED. As is well known to those skilled in the art, LEDs arepreferably operated with a constant current since the amount of lightthey produce is related to the current through the LED. A well-knownproblem is that when the LEDs are operated from a phase-cut dimmer, thedimmer changes the voltage applied to the LED and its driver circuit andthe driver circuit fights the changing voltage made by the dimmer inorder to try to operate the LED at the chosen constant current.

In FIG. 11, an LED driver circuit is shown, generally as 1100. A dimmer,which may be a phase-cut dimmer, 1102 is coupled to a rectifier circuit1104 and produces an output voltage V_(in) on the positive terminalthereof. This voltage is coupled to the cathode of the diode 1108 andthe anode of an LED 1112. The anode of diode 1108 is coupled to one endof inductor 1114, the other end of which is connected to the cathode ofthe LED 1112. The node at the junction of the anode of diode 1108 andthe inductor 1114 is coupled to one terminal of the conduction channelof switching transistor 1116. The other terminal of switching transistor1116 is coupled to ground via Rshunt 1118. The voltage across Rshunt1118 is coupled via resistor 1120 to the inverting input of amplifier1124. The inverting input of amplifier 1124 is also coupled to theoutput of the error amplifier 1124 via capacitor 1122. The negativeterminal of rectifier 1104 is coupled to ground. The positive voltageV_(in) is coupled via a resistor 1106, which may be 2MΩ for example, toone terminal of switch S1 1136. The other terminal of the switch S11136is connected to ground. The node between resistor 1106 and the firstterminal of switch S1 1136 is connected to the anode of the diode 11348,which is connected to the non-inverting input to error amplifier 1124.Also connected to the cathode of diode 1134 is a resistor 1130 which hasits other terminal connected to ground and a capacitor 1132 which hasits other terminal connected to ground. A pulse width modulation (PWM)circuit 1126(D) receives the output of sawtooth waveform generator 1128on its inverting input. The non-inverting input to pulse widthmodulation (PWM) circuit 1126 is coupled to the output of amplifier1124. The output of pulse width modulation (PWM) circuit 1126 is coupledthrough buffer 1115 to the gate of switching transistor 1116 and throughinverter 1140 and buffer 1138 to operate the switch S1 1136. Thus, theswitch S1 1136 is operated by the signal (1−D).

In the circuit shown in FIG. 11, K6 is a current rather than a voltageand is equal to 1 divided by resistor 1106, or in this case, ½MΩ. Inaddition, the first switch in the multiplier has been replaced with adiode 1134. When switch S1 1136 is open, current flows through diode1134 into capacitor 1132. When switch S1 1136 is closed, the anode ofdiode 1134 is grounded so that no current flows into the capacitor 1132and the capacitor discharges through the resistor 1130. This generates areference current at node 1131 equal to K6*V_(in)*D, which is applied tothe non-inverting input error amplifier 1124. The voltage across Rshunt1118 is applied via resistor 1120 to the inverting input of erroramplifier 1124 where it is averaged in conjunction with the capacitor1122 in the feedback loop. The output of error amplifier 1124 is fedinto the non-inverting input of pulse width modulation (PWM) circuit1126 which receives its sawtooth waveform on the inverting input thereoffrom source 1128. The error amplifier 1124 controls the operation ofpulse width modulation (PWM) circuit 1126 to generate a pulse widthmodulation (PWM) signal (D) (as is well known in the art) which isapplied through buffer 1115 to the gate of switching transistor 1116 andapplied through inverter 1140 and buffer 1138 to operate the switch S11136. From equation 1, we know that:I _(sw) =I _(in).

-   -   Here I_(sw) is equal to K6*V_(in)*D.        In addition:        I _(out) =I _(in) /D    -   This results in I_(out)=K6*V_(in).

Therefore, the output current through the LED 1112 is a linear functionof the input voltage, which produces the desired dimming effect withoutthe LED driver fighting the change in voltage produced by the dimmer1102.

FIG. 12 shows the waveform for the circuit shown in FIG. 11. Waveform1202 corresponds to the inductor current, waveform 1204 corresponds tothe input current. Waveform 1206 corresponds to the voltage of Vea atthe output of error amplifier 1124. Waveform 1208 corresponds to theinput voltage. In operation, the output voltage is constant so that theoutput current follows the input voltage waveform. The reference for theinput current is DC, so the input current is constant throughout thecycle and the driver input current will be a square wave with powerfactor of approximately 0.91.

FIG. 13 shows a buck-boost (flyback) circuit, generally as 1300. A DCvoltage source 1302 has its negative terminal coupled to ground, itspositive terminal connected to one terminal of the primary winding 1306transformer 1304. The other end of primary winding 1306 is coupled tothe conduction channel of a switching transistor 1314, the otherterminal of which is connected through a shunt 1324 to ground. Theswitching transistor 1314 is operated by a signal (D) output from pulsewidth modulation (PWM) circuit 1316. The pulse width modulation (PWM)circuit 1316 is operated under the control of amplifier 1318 which hasits inverting input coupled to the node between transistor 1314 andshunt 1324 by resistor 1322. A capacitor 1320 is coupled between theinverting input and the output of error amplifier 1318. A circuit 1326produces a voltage representative of the current desired at the outputof the power converter. It is coupled via switch 1328 to a node 1329,which in turn is coupled to ground via a switch 1330. The node 1329 iscoupled via resistor 1332 to a node 1333 which is coupled to ground viacapacitor 1334. The voltage at node 1333 is coupled to the non-invertinginput of amplifier 1336, the output of which is coupled to thenon-inverting input of error amplifier 1318. A capacitor 1338 is coupledbetween the output of amplifier 1336 and the inverting input thereof.The inverting input of amplifier 1336 is also coupled via resistor 1340to node 1343, which is coupled to ground by switch 1344 and coupled tothe output of the amplifier 1336 by switch 1342. On the secondary sideof transformer 1304, a diode 1310 is coupled in series with an LED 1312.

In operation, the switch 1328 is operated by the signal (D) output frompulse width modulation (PWM) circuit 1316 and the switch 1330 isoperated by the signal (1−D) which can be generated by inverting thesignal (D), for example (not shown). The voltage generated at node 1329is low pass filtered by resistor 1332 in capacitor 1334 to generate asignal K7*D which is input to the non-inverting terminal of amplifier1336. Amplifier 1336, capacitor 1338, resistor 1340 and switches 1342and 1344 form a division circuit which divides the signal K7*D by (1−D).That signal is applied to the non-inverting input of error amplifier1318.

Given the fact that this is a buck-boost circuit, utilizing equation 3,we know that:I _(out)*(1−D)=I _(in)Therefore I _(out) =I _(in)(1−D)/DI _(in) =K*D(1−D)Thus, if we force:I _(in) =K7*D/(1−D),then;I _(out) =K7*D/(1−D)*(1−D)/Dwhich means that:I _(out) =K7.

The signal applied to the non-inverting input of error amplifier 1318 isK*D/(1−D). The signal applied to the inverting input of error amplifier1318 is related to I_(in). Therefore, the circuit will operate tomaintain the output current through the LED 1312 equal to K7 and thusprovide a constant current output.

Although the invention has been described in detail, it should beunderstood that various changes, substitutions and alterations can bemade thereto without departing from the spirit and scope of theinvention as defined by the appended claims.

The invention claimed is:
 1. In a switching power converter for drivingan LED at a constant current comprising: a circuit for regulating theconverter so that the input current equals a constant times the dutycycle D of the converter, the circuit comprising: a main switch coupledto an input voltage source and being controlled by a Pulse WidthModulated (PWM) signal; an LED coupled between the input voltage sourceand the main switch; a current measuring device for measuring currentthrough the main switch; a current amplifier coupled to the currentmeasuring device and having an output coupled to a PWM signal generator,an output of the PWM signal generator being coupled to a controlelectrode of the main switch and a first node; a first switch coupledbetween the output of the PWM signal generator and a second node; asecond switch coupled between the second node and a reference voltage; acurrent reference being coupled to the first node; an input to thecurrent amplifier being coupled to the second node; the first switchbeing controlled by the PWM signal; the second switch being controlledby an inverse of the PWM signal, whereby the current through the LED canbe maintained substantially constant.
 2. The switching power converterof claim 1, wherein the LED is a string of serially connected LEDs. 3.The switching power converter of claim 2, wherein the current measuringdevice is a resistive shunt.
 4. The switching power converter of claim3, wherein the main switch is a MOS transistor.
 5. The switching powerconverter of claim 4, further comprising an inductor coupled in serieswith the LED or LED string.
 6. The switching power converter of claim 5,wherein a diode is coupled across the series connection of the LED orLED string and the inductor.
 7. The switching power converter of claim6, wherein the switching power converter is a buck converter regulator.8. In a switching power converter for driving an LED at a constantcurrent comprising: a circuit for regulating the converter so that anoutput current equals a constant, the circuit comprising: a main switchcoupled to an input voltage source and being controlled by a Pulse WidthModulated (PWM) signal; an LED coupled between the input voltage sourceand the main switch; a current measuring device for measuring currentthrough the main switch; a current amplifier having a first inputcoupled to the measuring device and a second input coupled to a currentreference and having an output coupled to a PWM signal generator forgenerating a PWM signal, the PWM signal being coupled to a controlelectrode of the main switch and being coupled to an input of a dividercircuit; the divider circuit comprising an operational amplifier havinga first input coupled to the current measuring device and having afeedback loop comprising a first switch coupled between an output of theoperational amplifier and a node, a second switch coupled between thenode and a reference voltage, the first switch being operated by asignal D of the PWM signal and the second switch being operated by asignal 1−D of the PWM signal, wherein output current of the converter isforced to a value of the current reference.
 9. The switching powerconverter of claim 8, wherein the LED is a string of serially connectedLEDs.
 10. The switching power converter of claim 9, wherein the currentmeasuring device is a resistive shunt.
 11. The switching power converterof claim 10, wherein the main switch is a MOS transistor.
 12. Theswitching power converter of claim 11, further comprising an inductorcoupled in series with the LED or LED string.
 13. The switching powerconverter of claim 12, wherein a diode is coupled across the seriesconnection of the LED or LED string and the inductor.
 14. The switchingpower converter of claim 13, wherein the switching power converter is abuck regulator.
 15. In a switching power converter for driving an LED ata constant current utilizing a main switch couplable to an input voltagesource and couplable to an inductor and having a current measuringdevice in series with the main switch, a controller for regulating theconverter comprising: a current amplifier coupled to the currentmeasuring device and having an output coupled to a Pulse Width Modulator(PWM) signal generator, an output of the PWM signal generator couplableto a control electrode of the main switch and coupled to a first node; afirst switch coupled between an output of the PWM signal generator and asecond node; a second switch coupled between the second node and areference voltage; a current reference coupled to the first node; aninput the current amplifier being coupled to the second node; the firstswitch being controlled by the PWM signal; the second switch beingcontrolled by an inverse of the PWM signal, whereby current through anLED couplable to the main switch can be maintained substantiallyconstant.
 16. The controller of claim 15, wherein a constant currentreference is coupled to the first node.
 17. The controller of claim 16,wherein the current measuring device in series with the main switch is aresistive shunt coupled to an input of the current amplifier.
 18. Thecontroller of claim 17, wherein the main switch is a MOS transistorhaving a gate coupled to the PWM signal generator.
 19. The controller ofclaim 18, wherein a load for the converter is an LED or a string of LEDscoupled to the main switch.
 20. The controller of claim 19, wherein theswitching power converter is a buck regulator.